package eval.vm;

import java.util.Comparator;

public class MinCPURequiredComparator implements Comparator<VirtualMachine> {

	@Override
	public int compare(VirtualMachine v1, VirtualMachine v2) {
		if (v1.getVMConfiguration().getMinCpu() < v2.getVMConfiguration()
				.getMinCpu())
			return -1;
		
		if (v1.getVMConfiguration().getMinCpu() > v2.getVMConfiguration()
				.getMinCpu())
			return 1;
		
		return 0;
	}

}
